FROM registry.cn-hangzhou.aliyuncs.com/base-linux/centos7.6:jkd8
MAINTAINER this is Micro-services image <boren>
RUN mkdir /home/java
RUN mkdir /home/java/logs
#导入jar包
ADD eureka-0.0.1-SNAPSHOT.jar  /home/java/eureka.jar
ADD start.sh /home/java/start.sh 
# 暴露服务端口
EXPOSE 8081
#数据卷挂载
VOLUME ["/home/java/logs"]
WORKDIR /home/java/
# entrypoint：设定容器启动时第一个运行的命令及参数
#ENTRYPOINT ["/bin/bash","start.sh"]
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","eureka.jar"]
